/**
 * Generate time : 2011-06-21 13:28:06
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.common.zm.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCDFiles
 * 
 */
@SuppressWarnings("serial")
public class ZMCDFiles extends DaoEPBase {

	private String fdKeyId = " "; /* 主键 */
	private String fdFileName = " "; /* 文件名称 */
	private String fdMemoryName = " "; /* 存储名称 */
	private String fdFileSize = " "; /* 文件大小 */
	private String fdForeignId = " "; /* 外键 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("主键");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdFileName");
		eiColumn.setFieldLength(200);
		eiColumn.setDescName("文件名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdMemoryName");
		eiColumn.setFieldLength(200);
		eiColumn.setDescName("存储名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdFileSize");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("文件大小");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdForeignId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("外键");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCDFiles() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - 主键
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - 主键
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdFileName - 文件名称
	 * 
	 * @return the fdFileName
	 */
	public String getFdFileName() {
		return this.fdFileName;
	}

	/**
	 * set the fdFileName - 文件名称
	 */
	public void setFdFileName(String fdFileName) {
		this.fdFileName = fdFileName;
	}

	/**
	 * get the fdMemoryName - 存储名称
	 * 
	 * @return the fdMemoryName
	 */
	public String getFdMemoryName() {
		return this.fdMemoryName;
	}

	/**
	 * set the fdMemoryName - 存储名称
	 */
	public void setFdMemoryName(String fdMemoryName) {
		this.fdMemoryName = fdMemoryName;
	}

	/**
	 * get the fdFileSize - 文件大小
	 * 
	 * @return the fdFileSize
	 */
	public String getFdFileSize() {
		return this.fdFileSize;
	}

	/**
	 * set the fdFileSize - 文件大小
	 */
	public void setFdFileSize(String fdFileSize) {
		this.fdFileSize = fdFileSize;
	}

	/**
	 * get the fdForeignId - 外键
	 * 
	 * @return the fdForeignId
	 */
	public String getFdForeignId() {
		return this.fdForeignId;
	}

	/**
	 * set the fdForeignId - 外键
	 */
	public void setFdForeignId(String fdForeignId) {
		this.fdForeignId = fdForeignId;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdFileName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFileName")), fdFileName));
		setFdMemoryName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdMemoryName")), fdMemoryName));
		setFdFileSize(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdFileSize")), fdFileSize));
		setFdForeignId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdForeignId")), fdForeignId));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdFileName", StringUtils.toString(fdFileName, eiMetadata.getMeta("fdFileName")));
		map.put("fdMemoryName", StringUtils.toString(fdMemoryName, eiMetadata.getMeta("fdMemoryName")));
		map.put("fdFileSize", StringUtils.toString(fdFileSize, eiMetadata.getMeta("fdFileSize")));
		map.put("fdForeignId", StringUtils.toString(fdForeignId, eiMetadata.getMeta("fdForeignId")));

		return map;

	}
}